var type2Java = new Map([
  ["tinyint", "Integer"],
  ["smallint", "Integer"],
  ["mediumint", "Integer"],
  ["int", "Integer"],
  ["integer", "Integer"],
  ["bigint", "Long"],
  ["float", "Float"],
  ["double", "Double"],
  ["decimal", "BigDecimal"],
  ["bit", "Boolean"],
  ["char", "String"],
  ["varchar", "String"],
  ["tinytext", "String"],
  ["text", "String"],
  ["mediumtext", "String"],
  ["longtext", "String"],
  ["date", "Date"],
  ["datetime", "Date"],
  ["timestamp", "Date"],
  ["NUMBER", "Integer"],
  ["INT", "Integer"],
  ["INTEGER", "Integer"],
  ["BINARY_INTEGER", "Integer"],
  ["LONG", "String"],
  ["FLOAT", "Float"],
  ["BINARY_FLOAT", "Float"],
  ["DOUBLE", "Double"],
  ["BINARY_DOUBLE", "Double"],
  ["DECIMAL", "BigDecimal"],
  ["CHAR", "String"],
  ["VARCHAR", "String"],
  ["VARCHAR2", "String"],
  ["NVARCHAR", "String"],
  ["NVARCHAR2", "String"],
  ["CLOB", "String"],
  ["BLOB", "String"],
  ["DATE", "Date"],
  ["DATETIME", "Date"],
  ["TIMESTAMP", "Date"],
  ["int8", "Long"],
  ["int4", "Integer"],
  ["int2", "Integer"],
  ["numeric", "BigDecimal"]
]);

function toJava(dtype) {
  var value = type2Java.get(dtype);
  if (value == null || value == undefined) {
    return "unknow";
  }
  return value;
}

export { toJava };
